#include "PrecompiledHeader_Test.h"
#include "CGame.h"

/*--------------------------------------------------------------------------*/

CGame::CGame() :
	EngMod("CGame/Test", vl::DelayedInit::ViaLactea_Initiated)
{

}

/*--------------------------------------------------------------------------*/

CGame::~CGame()
{
	delete this->cSimpleGame;
}

/*--------------------------------------------------------------------------*/

void CGame::OnCreate()
{
	ViaLactea::getInstance()->AddToInit(this);

	CContext::getInstance()->LoadContexts("../Data/engineer_contexts.xml");
	CResources::getInstance()->LoadResources("../Data/engineer_resources.xml");
	CMaterial::getInstance()->LoadMaterials("../Data/engineer_materials.xml");
}

/*--------------------------------------------------------------------------*/

void CGame::OnInit()
{
	this->cSimpleGame = new SimpleGame();
	//ViaLactea::getInstance()->RegisterFunction(this, 0, ViaLactea::getInstance()->GetStateId("default"), vl::LoopPriority::LOOP_POS_A3D, vl::LoopPriority::PRIORITY_8, "testgame");
}

/*--------------------------------------------------------------------------*/

SimpleGame* CGame::GetSimpleGame()
{
	return this->cSimpleGame;
}

/*--------------------------------------------------------------------------*/

void CGame::Queue(const unsigned int i)
{
// 	switch (i)
// 	{
// 	case 0:
// 	{
// 		this->cSimpleGame->Calc();
// 	}
// 	}
}

/*--------------------------------------------------------------------------*/